package com.starhub.integration.milvus.langchain;

import java.util.List;

import io.milvus.client.MilvusClient;
import io.milvus.grpc.FlushResponse;
import io.milvus.grpc.MutationResult;
import io.milvus.param.R;
import io.milvus.param.collection.FlushParam;
import io.milvus.param.dml.InsertParam;

public class MilvusUtil {

    /*public static R<MutationResult> insert(MilvusClient milvusClient, String collectionName,
            List<InsertParam.Field> fields) {
        InsertParam request = CollectionRequestBuilder.buildInsertRequest(collectionName, fields);
        R<MutationResult> response = milvusClient.insert(request);
        CollectionOperationsExecutor.checkResponseNotFailed(response);

        flush(milvusClient, collectionName);
        return response;
    }

    static void flush(MilvusClient milvusClient, String collectionName) {
        FlushParam request = CollectionRequestBuilder.buildFlushRequest(collectionName);
        R<FlushResponse> response = milvusClient.flush(request);
        CollectionOperationsExecutor.checkResponseNotFailed(response);
    }*/
}
